import { inject, InjectionKey, reactive } from 'vue'

export interface IconConfig {
  size: number
}

export const IconConfigProvideKey: InjectionKey<IconConfig> =
  Symbol('IconConfig')

export const useIconConfig = () => {
  const iconConfig = inject(IconConfigProvideKey)!
  if (!iconConfig) {
    throw new Error('Can not use Icon without IconProvider')
  }
  return iconConfig
}
